$OpenBSD: patch-Makerules,v 1.17 2017/05/05 14:02:51 sthen Exp $
Index: Makerules
--- Makerules.orig
+++ Makerules
@@ -26,8 +26,8 @@ ifeq "$(build)" "debug"
 CFLAGS += -pipe -g
 LDFLAGS += -g
 else ifeq "$(build)" "release"
-CFLAGS += -pipe -O2 -DNDEBUG -fomit-frame-pointer
-LDFLAGS += $(LDREMOVEUNREACH) -Wl,-s
+CFLAGS += -DNDEBUG
+LDFLAGS += $(LDREMOVEUNREACH)
 else ifeq "$(build)" "small"
 CFLAGS += -pipe -Os -DNDEBUG -fomit-frame-pointer
 LDFLAGS += $(LDREMOVEUNREACH) -Wl,-s
@@ -110,7 +110,7 @@ LD := xcrun ld
 RANLIB_CMD := xcrun ranlib $@
 
 # Linux uses pkg-config for system libraries.
-else ifeq "$(OS)" "Linux"
+else
 
 HAVE_PTHREAD := yes
 SYS_PTHREAD_CFLAGS :=
@@ -132,7 +132,7 @@ SYS_CURL_CFLAGS += $(shell pkg-config --cflags openssl
 SYS_CURL_DEPS += $(shell pkg-config --libs openssl)
 endif
 endif
-SYS_CURL_DEPS += -lpthread -lrt
+SYS_CURL_DEPS += -lpthread
 
 ifeq "$(shell pkg-config --exists x11 xext && echo yes)" "yes"
 HAVE_X11 := yes
